<?php 
session_start();
require_once('Conection_DataBase.php');

mysql_select_db($database_jssue, $jssue);
$Querry_recordSet = "select * from cllg_student";
$recordset = mysql_query($Querry_recordSet, $jssue) or die(mysql_error());

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Reporte Detallado Facturas</title>
        <link href="../../../bootstrap/css/bootstrap.css"
        <link href="../../../css/ContentStyle.css" rel="stylesheet" type="text/css" />
        <link href="css/calendar.css" rel="stylesheet" type="text/css" />
        <link href="../../../js/protocalendar/datepicker.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="../../../js/prototype162.js"></script>
        <script type="text/javascript" src="calendarDateInput.js"></script>
        <script type="text/javascript">
            showFactura=function(btn) {
	            var URL='RepFacturaDetalle.php?'+$(btn.form).serialize();
	            eval("reporte = window.open(URL,'_blank', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1000,height=500,left = 682.5,top = 412.5');");
            }
        </script>
    </head>

    <body>

        <form id="form1" name="form1" method="post" action="BasefacturaDetalle.php">
            <table width="100%" border="0" cellspacing="0" class="">
                <tr>
                    <th colspan="3"><ul class="nav nav-tabs"><li class="active"><a>Facturación detallada</a></li></th>
                </tr>
                <tr>
                    <th colspan="3"><legend>Seleccione Fecha desde, hasta para generar el reporte deseado</legend></th>
                </tr>
                <tr>
                    <td width="15%"><label for="txtFechDesde">Desde:</label></td>
                    <td width="55%">
                        <script>DateInput('txtFechDesde', true, 'YYYY-MM-DD')</script>
                    </td>
                    <td width="35%" rowspan="2">
                        <input name="checkAllFechas" type="checkbox" id="checkAllFechas" value="1" checked="checked" />
                        <label for="checkAllFechas">Todas las fechas</label>
                    </td>
                </tr>
                <tr>
                    <td><label for="txtFechHasta">Hasta:</label></td>
                    <td><script>DateInput('txtFechHasta', true, 'YYYY-MM-DD')</script></td>
                </tr>
                <tr>
                    <td>No. Reporte</td>
                    <td><input type="text" name="noreporte" id="noreporte" /></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>No. Boleta Deposito</td>
                    <td><input type="text" name="noboleta" id="noboleta" /></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <th colspan="3">Seleccion por modo de busqueda</th>
                </tr>
                <tr>
                    <td><label for="idEstudiante">Carnet estudiante</label></td>
                    <td>
                        <span id="spryselect1">
                            <select name="idEstudiante" id="idEstudiante">
                                <?php
                                while ($rowRecordset=mysql_fetch_assoc($recordset)) {
                                    ?>
                                    <option value="<?php echo $rowRecordset['ID']; ?>"><?php echo $rowRecordset['ID']; ?></option>
                                    <?php
                                }
                                ?>
                            </select>
                            <span class="selectRequiredMsg"></span>
                        </span>
                    </td>
                    <td>
                        <input name="usaEstudiante" type="checkbox" id="usaEstudiante" value="1" />
                        <label for="usaEstudiante">Utilizar</label>
                    </td>
                </tr>
                <tr>
                    <td><label for="tipoPago">Tipo de pago</label></td>
                    <td>
                        <span id="spryselect2">
                            <select name="tipoPago" id="tipoPago">
                                <option value="EFECTIVO" selected="selected">EFECTIVO</option>
                                <option value="CHEQUE">CHEQUE</option>
                                <option value="DEPOSITO">DEPOSITO</option>
                            </select>
                            <span class="selectRequiredMsg"></span>
                        </span>
                    </td>
                    <td>
                        <input name="usaTipoPago" type="checkbox" id="usaTipoPago" value="1" />
                        <label for="usaTipoPago">Utilizar</label>
                    </td>
                </tr>
                <tr>
                    <td colspan="3" align="center">
                        <label>
                            <input name="button" type="button" class="btnCustom" id="button" onclick="showFactura(this)" value="Procesar..." />
                        </label>
                    </td>
                </tr>
            </table>
        </form>
    </body>
</html>